using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using RecruitmentSystem.Business;
using RecruitmentSystem.Common;

public partial class Share_EnterpriseMaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Context.User.Identity.Name))
        {
            AccountManager am = new AccountManager();
            EnterpriseUser user = (EnterpriseUser)am.GetUserById(Context.User.Identity.Name, UserType.EnterpriseUser);
            if (user.Status == UserStatus.Unapproved)
            {
                hdIsApproved.Value = "0";
            }
            else
            {
                hdIsApproved.Value = "1";
            }
        }
        else
        {
            Response.Redirect("~/Default.aspx");
        }
    }
    protected void lbSignout_Click(object sender, EventArgs e)
    {
        FormsAuthentication.SignOut();
        Response.Redirect("~/Default.aspx");
    }
}
